package com.atguigu.tingshu.account.mapper;

import com.atguigu.tingshu.model.account.UserAccountDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author Petrichor
 */
@Mapper
public interface UserAccountDetailMapper extends BaseMapper<UserAccountDetail> {
    /**
     * 获取登录用户的记录 根据用户id 交易类型
     * @author Petrichor
     * @date 2024/1/11 14:03
     * @param userId 用户id
     * @param tradeType 交易类型
     * @return 当前登录用户的消费记录
     **/
    IPage<UserAccountDetail> selectUserTradeTypePage(Page<UserAccountDetail> pageParam,
                                                     @Param(value = "userId") Long userId,
                                                     @Param(value = "tradeType")Long tradeType);
}
